<template>
	<view>

		<!-- <view v-for="x in list"> -->

		<!-- <view style="margin-top:20rpx;" class="gui-padding-x">
				<text class="gui-h6 gui-color-gray">{{x.categoryName}}</text>
			</view> -->
		<view class="gui-bg-white gui-dark-bg gui-padding gui-margin-top gui-flex gui-row gui-wrap">
			<gui-tags v-for="z in list" :text="z.categoryName" @tapme="checkTag(z)" :size="32" :padding="25"></gui-tags>
			<gui-tags @tapme="checkTag(' ')" text="自定义" :size="32" :padding="25"></gui-tags>
		</view>
		<!-- </view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {

			var self = this;
			uni.gRequest.get("category/list").then(x => {

				console.log(x)

				self.list = x.rows;
			})

		},
		methods: {
			checkTag(z) {
				uni.setStorageSync("selectCategory", z);
				// // console.log(123);
				uni.navigateBack();
			},



		}
	}
</script>

<style>

</style>
